//
//  UserModel.h
//  RainbowFM
//
//  Created by chenli on 14/12/17.
//  Copyright (c) 2014年 RB. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UserItem : NSObject

@property (nonatomic,strong) NSString *address;
@property (nonatomic,strong) NSString *birthday;
@property (nonatomic,strong) NSString *headPic;
@property (nonatomic,strong) NSString *nickName;
@property (nonatomic,strong) NSString *sex;
@property (nonatomic,strong) NSString *sign;
@property (nonatomic,strong) NSString *userId;
@property (nonatomic,strong) NSString *userTel;

-(instancetype)initWithAttributes:(NSDictionary *)attributes;

@end


@interface AddressListItem : NSObject

@property (nonatomic,strong) NSString *deliAddr;
@property (nonatomic,strong) NSString *deliId;
@property (nonatomic,strong) NSString *deliName;
@property (nonatomic,strong) NSString *deliTel;

-(instancetype)initWithAttributes:(NSDictionary *)attributes;

@end


@interface UserModel : NSObject

+(instancetype)sharedModel;

@property (nonatomic,strong) UserItem *userInfo;

-(void)fetchUserProfile:(void(^)(BOOL success))result;

-(void)editUserProfileNickName:(NSString *)nickName reuslt:(void(^)(BOOL success))res;
-(void)editUserProfileSex:(NSString *)sex result:(void(^)(BOOL success))res;
-(void)editUserProfileBirthday:(NSString *)birthday reuslt:(void(^)(BOOL success))res;
-(void)editUserProfileArea:(NSString *)area result:(void(^)(BOOL success))res;
-(void)editUserProfileSign:(NSString *)sign result:(void(^)(BOOL success))res;
-(void)editUserProfileHeadImage:(NSString *)imagePath result:(void(^)(BOOL success))res;

-(void)upLoadUserHeadImage:(NSData *)imageData result:(void(^)(BOOL success,NSString *path))res;

-(void)fetchUserAddressListWithPage:(int)page result:(void(^)(BOOL success,NSArray *array))res;

-(void)addAddressWithDeliName:(NSString *)name deliTel:(NSString *)tel deliAreaAddr:(NSString *)area deliDtlAddr:(NSString *)addr result:(void(^)(BOOL success))res;

-(void)editAddressWithDeliName:(NSString *)name deliID:(NSString *)deliId deliTel:(NSString *)tel deliAreaAddr:(NSString *)area deliDtlAddr:(NSString *)addr result:(void(^)(BOOL success))res;

-(void)removeAddressWithDeliID:(NSString *)Id result:(void(^)(BOOL success))res;

-(void)fetchUserAddressDetailWithDeliID:(NSString *)Id result:(void(^)(BOOL success,NSDictionary *dict))res;

@end
